import request from '../utils/request.js'
// 获取供应商管理数据列表接口
const getSupplierList = (obj,obj1) => {
    return request({url:`/supplier/list/search/${obj.pageNum}/${obj.pageSize}`,method: 'POST', data:obj1})
}
// 删除接口
const removeSupplier = (id) =>{
    return request({url:`/supplier/${id}`,method:'DELETE'})
}
// 新增接口
const addSupplier = (data={}) => {
    return request({url:'/supplier',method:'POST',data})
}
// 查找单个
const findSupplier = (id) =>{
    return request({url:`/supplier/${id}`,method:'GET'})
}
// 编辑供应商
const editSupplier = (id,data={}) =>{
    return request({url:`/supplier/${id}`,method:'PUT',data})
}
export default {
    getSupplierList,
    removeSupplier,
    findSupplier,
    editSupplier,
    addSupplier
}